/**
 * 
 */
package com.nh.orderEntity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.nh.entity.BaseEntity;

/**
 * 项目名称：OrderingMiddleware
 * 
 * 类名称：VegetablesTypeEntity
 * 
 * 类描述：菜分类
 * 
 * 创建人：李兴建
 * 
 * E-mail:lxj08193@163.com
 * 
 * 创建时间：2013-1-8 上午10:51:22
 * 
 * 修改人：李兴建
 * 
 * 修改时间：2013-1-8 上午10:51:22
 * 
 * 修改备注：
 * 
 * @version
 */
@Entity
@Table(name = "c_type")
public class VegetablesTypeEntity extends BaseEntity {
    private int vid;// 类别id
    private String vid2;
	private String code;// 类别编号
	private String title;// 类别名称
	private String chinese;// 类别拼音码
	private int typeId;// 大大类id (用不到)
	@Transient
	private List<VegetablesEntity> vegetablesList = new ArrayList<VegetablesEntity>();

	/**
	 * @return the vid
	 */
	
	@Id	
	@Column(name="类别id")
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "XNKY_BASE_IDENTITY")
	@SequenceGenerator(name = "XNKY_BASE_IDENTITY", initialValue = 1000000, allocationSize = 1)
	public int getVid() {
		return vid;
	}

	/**
	 * @return the vid2
	 */
	@Transient
	public String getVid2() {
		return vid+"";
	}

	/**
	 * @param vid2 the vid2 to set
	 */
	public void setVid2(String vid2) {
		this.vid2 = vid2;
	}

	/**
	 * @param vid the vid to set
	 */
	public void setVid(int vid) {
		this.vid = vid;
	}

	/**
	 * @return the code
	 */
	@Column(name="类别编号")
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the title
	 */
	@Column(name="类别名称")
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the chinese
	 */
	@Column(name="类别拼音码")
	public String getChinese() {
		return chinese;
	}

	/**
	 * @param chinese
	 *            the chinese to set
	 */
	public void setChinese(String chinese) {
		this.chinese = chinese;
	}

	/**
	 * @return the typeId
	 */
	@Column(name="大大类id")
	public int getTypeId() {
		return typeId;
	}

	/**
	 * @param typeId
	 *            the typeId to set
	 */
	public void setTypeId(int typeId) {
		this.typeId = typeId;
	}

	/**
	 * @return the vegetablesList
	 */
	@Transient
	public List<VegetablesEntity> getVegetablesList() {
		return vegetablesList;
	}

	/**
	 * @param vegetablesList
	 *            the vegetablesList to set
	 */
	public void setVegetablesList(List<VegetablesEntity> vegetablesList) {
		this.vegetablesList = vegetablesList;
	}

}
